//
// Created by dyc on 25-1-4.
//LoadParam类，分别从两个yaml文件中读取参数，并将参数传入camera类

#pragma once

#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <yaml-cpp/yaml.h>
#include <string>

#include <camera.h>
#include <control.h>
#include "detector.h"

namespace hitcrt {
    class LoadParam {
    public:
        //手动提供文件地址
        LoadParam(const std::string &filePath_camera, const std::string &filePath_param);
        //使用默认的文件地址
        LoadParam();

        ~LoadParam()= default;
        void getCameraParam(Camera& camera);

        void getDetectParam(Detect &detect);

        void getCamFixParam(cv::Mat &cameraMatrix, cv::Mat &distCoeffs);

        YAML::Node getControlParam();
    private:
        std::string m_filePath_camera;
        std::string m_filePath_param;
        YAML::Node m_configCamera;
        YAML::Node m_configParam;
    };
}
